<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%=basePath %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>jb-aptech毕业设计项目</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">

<link href="<%=basePath%>crm_demo/html/css/style.css" rel="stylesheet" type="text/css">
<script src="<%=basePath%>crm_demo/html/script/common.js"></script>
</head>
<body>

<div class="page_title">销售机会管理</div>
<div class="button_bar">
	<button class="common_button" onClick="help('');">帮助</button>
	<button class="common_button" onClick="to('<%=basePath%>crm_demo/html/~sale/add.jsp');">新建</button>  
	<button class="common_button" onClick="selectMar()">查询</button> 
	</div>
<form action="AllMarket.action" id="select" method="post">
<table class="query_form_table">
	<tr>
		<th>客户名称</th>
		<td><input  name="cond.cusName" size="10" maxlength="20" value=""/></td>
		<th>概要</th>
		<td><input  name="cond.outLine" size="10" maxlength="20" value=""/></td>
		<th>联系人</th>
		<td>
			<input  name="cond.connPeop" size="10" maxlength="20" value=""/>
		</td>
	</tr>
	</table>
</form>
<br />
<table class="data_list_table">
	<tr>
		<th>编号</th>
		<th>客户名称</th>
		<th>概要</th>
		<th>联系人</th>
		<th>联系人电话</th>
		<th>创建时间</th>
		<th>操作</th>
	</tr><!--
	<c:forEach var="mar" items="${sessionScope.marklist}">
		${mar.cusName}
	</c:forEach>
	--><s:iterator value="#session.marklist" status="index" >
	<tr>
	
		<td class="list_data_number"><s:property value="marketId"/></td>
		<td class="list_data_text"><s:property value="cusName"/></td>
		<td class="list_data_ltext"><s:property value="outLine"/></td>
		<td class="list_data_text"><s:property value="connPeop"/></td>
		<td class="list_data_text"><s:property value="connTel"/></td>
		<td class="list_data_text"><s:property value="createDate"/></td>
		<td class="list_data_op">
			<img onClick="to('<%=basePath%>zhipai.action?marId=<s:property value="marketId"/>');" title="指派" src="images/bt_linkman.gif" class="op_button" />
			<img onClick="to('<%=basePath%>crm_demo/html/~sale/edit.jsp?marId=<s:property value="marketId"/>');" title="编辑" src="images/bt_edit.gif" class="op_button" />
			<img onClick="del('您确定删除《<s:property value="cusName"/>》的销售机会','SaveUpDelMarket.action?peram=delete&market.marketId=<s:property value="marketId"/>');" title="删除" src="images/bt_del.gif" class="op_button" />

		</td>
	</tr>
	</s:iterator>
	<tr>
		<th colspan="7" class="pager">
<div class="pager">
	共<s:property value='pag.allRecds'/>条记录 每页<s:property value='pag.pageSize'/>条
	第<s:property value='pag.pageNo'/>页/共<s:property value='pag.allRecds%pag.pageSize==0?pag.allRecds/pag.pageSize:pag.allRecds/pag.pageSize+1'/>页
	<a href="AllMarket.action?pag.pageNo=1">第一页</a>
	<a href="AllMarket.action?pag.pageNo=<s:property value='pag.pageNo-1'/>">上一页</a>
	<a href="AllMarket.action?pag.pageNo=<s:property value='pag.pageNo+1'/>">下一页</a>
	<a href="AllMarket.action?pag.pageNo=<s:property value='pag.allRecds%pag.pageSize==0?pag.allRecds/pag.pageSize:pag.allRecds/pag.pageSize+1'/>">最后一页</a>
	转到<input value="1" id="tiao" size="2" />页
	<button width="20" onClick="repla()">GO</button>
</div>
		</th>
	</tr>
</table>
</body>
</html>
<script>
function repla(){
var tiao=document.getElementById("tiao");
location.href="AllMarket.action?pag.pageNo="+tiao.value;

}

function selectMar(){
document.getElementById("select").submit();

}

</script>